import http from "@/tool/Http";
import {AxiosResponse} from "axios";

class Request {
    login(loginData: LoginData): Promise<AxiosResponse<any>> {
        return http.request("api/auth/login", loginData, "post");
    }

    postRefreshToken(refreshToken: LoginResponse): Promise<AxiosResponse> {
        return http.request("api/auth/token", refreshToken, "post" )
    }

    getUserInfo(){
        return http.request("api/auth/user",{},"get")
    }
}

const request: Request = new Request();
export default request;
